package com.qf.proxy;

import com.qf.service.UserService;
import com.qf.service.impl.UserServiceImpl;

public class StaticProxyUserService {

    private UserService userService = new UserServiceImpl();

    public void save(){
        System.out.println("开启事务");
        try {
            userService.save();
            System.out.println("提交事务");
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("回滚事务");
        }
    }

}
